﻿CREATE PROCEDURE [dbo].[smenu_TrackerRequest_CheckTechnician]
(	@TrackerRequestID int
)
AS
SET NOCOUNT ON

IF EXISTS(SELECT * FROM t_TrackerRequest WHERE ID = @TrackerRequestID AND TechnicianID <> 0)RETURN

RAISERROR('Installer mast be assigned!',16,1)

IF @@TRANCOUNT > 0 ROLLBACK TRAN

